﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GroupBuy.Model;
using GroupBuy.Model.DAO;
using GroupBuy.Util;

namespace GroupBuy.View
{
	public partial class RegisterSuccess : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if(!IsPostBack)
			{
                string name = Request.QueryString["username"];
                string password = Request.QueryString["password"];
                string _email = Request.QueryString["email"];
                string _city = Request.QueryString["cityList"];
                string mobile = Request.QueryString["mobile"];
                UserDAO.Add(new Tab_User
				            	{
                                    userName = name,
                                    password = Utils.EncodeMD5(password),
                                    email = _email,
                                    city = _city,
                                    mobilePhone = mobile
				            	});
				registername.Text = name;
			}
		}
	}
}